<!-- Dom模板 -->
<template>
    
  <div>
        <!-- Dom内容 -->
    <div class="setClass">
      <div class="popBack">
        <p>秒杀活动/课程设置</p>
        <el-row>
          <el-button type="primary" style="background: #38a28a" @click="closePop">返回</el-button>
        </el-row>
      </div>
      <el-table :data="datas" width="100%" max-height="530">
        <el-table-column width="100" prop="isChecked">
          <template slot-scope="scope">
            <el-checkbox
              :checked="scope.row.checked === 'Y' ? true : false"
              @change="changeChecked(scope.row.id)"
            ></el-checkbox>
          </template>
        </el-table-column>
        <el-table-column prop="id" label="活动编号" width="120px">
        </el-table-column>
        <el-table-column prop="title" label="活动标题" width="160px">
        </el-table-column>
        <el-table-column prop="img" label="活动封面" width="120px">
          <template slot-scope="scope">
            <img :src="scope.row.img" alt="" width="100px" height="60px" />
          </template>
        </el-table-column>
        <el-table-column prop="type" label="活动状态" width="120px">
          <template slot-scope="scope">
            <span>{{ scope.row.type == 1 ? "进行中" : "已下线" }}</span>
          </template>
        </el-table-column>
        <el-table-column prop="startTime" label="开始时间" width="170px">
        </el-table-column>
        <el-table-column prop="endTime" label="结束时间" width="170px">
        </el-table-column>
      </el-table>
    </div>
      
  </div>
</template>

<script>
// import a from './a'; // 引入组件
export default {
  data() {
    return {
      datas: [],
    };
  },
  props: ["allData", "closePop"], // 生命周期 - 创建完成（访问当前this实例）
  created() {}, // 生命周期 - 挂载完成（访问DOM元素）
  mounted() {
    this.datas = this.allData;
    console.log(this.datas);
  }, // Vue方法定义
  methods: {},
};
</script>

<style scoped>
/* @import url(''); 引入css类 */
.setClass {
  width: calc(100% - 200px);
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  background: #eaeaea;
  align-items: center;
  padding: 0 20px;
  position: fixed;
  left: 200px;
  top: 60px;
  z-index: 99;
}
.popBack {
  width: 100%;
  height: 100px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
</style>